<template>
  <div class="barCharts" ref="barCharts"></div>
</template>

<script>
let echarts = require("echarts");
export default {
  name: "barCharts",
  mounted() {
    let barCharts = echarts.init(this.$refs.barCharts);
    barCharts.setOption({
      xAxis: { show: false, type: "category" },
      yAxis: { show: false },
      series: {
        type: "bar",
        data: [10, 7, 33, 12, 48, 9, 29, 10, 44, 33, 22, 8]
      },
      //布局调试
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
      tooltip:{}
    });
  },
};
</script>

<style>
.barCharts {
  width: 100%;
  height: 100%;
}
</style>
